﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="../../../lib/ligerUI/skins/Aqua/css/ligerui-all.css"
	rel="stylesheet" type="text/css" />
<link href="../../../lib/ligerUI/skins/Gray/css/all.css"
	rel="stylesheet" />
<script src="../../../lib/jquery/jquery-1.5.2.min.js"
	type="text/javascript"></script>
<script src="../../../lib/ligerUI/js/ligerui.all.js"
	type="text/javascript"></script>
<script src="../../grid/CustomersData.js"></script>
<script src="../citylink.js"></script>
</head>
<body style="padding: 10px">
	<div id="form1" class="liger-form">
		<div class="fields">
			<input data-type="text" data-label="标题" data-name="Title" /> <input
				data-type="date" data-label="入职日期" data-name="addDate"
				data-newline="false" />
			<div data-type="select" data-label="国家" data-name="Country">
				<input class="editor" data-data="getCountryData()"
					data-onSelected="f_onCountryChanged" data-textField="Country"
					data-valueField="Country" />
			</div>
			<div data-type="select" data-label="城市" data-name="City">
				<input class="editor" data-textField="City" data-valueField="City" />
			</div>
		</div>
	</div>
	<script>
        //国家 改变事件：清空城市,重新绑定数据
        function f_onCountryChanged(value)
        {
            var combo = liger.get('City');
            var data = getCityData(value); 
            combo.clear();
            combo.set('data', data);
        } 
    </script>
</body>
</html>
